package com.example.attendancesystem_1_8.backendInterface;


public class addScheduleThread extends Thread
{
    /*
    beginHour	整型	上班打卡时间的小时
    beginMinute	整型	上班打卡时间的分钟
    beginError	整型	上班打卡时间允许的误差
    endHour	整型	下班打卡时间的小时
    endMinute	整型	下班打卡时间的分钟
    endError	整型	下班打卡允许的误差时间
    leaderId	整型	主管的id
    week	字符串	每周有哪几天需要打卡（如周三到周日需打卡则为34567）
        */

    private int beginHour, beginMinute, beginError, endHour, endMinute, endError, leaderId;
    private String week;

    public addScheduleThread(int beginHour, int beginMinute, int beginError, int endHour, int endMinute, int endError, int leaderId, String week)
    {
        this.beginHour = beginHour;
        this.beginMinute = beginMinute;
        this.beginError = beginError;
        this.endHour = endHour;
        this.endMinute = endMinute;
        this.endError = endError;
        this.leaderId = leaderId;
        this.week = week;
    }

    @Override
    public synchronized void start()
    {
        super.start();
    }

    @Override
    public void run()
    {
        int result;
        result = Schedule.addSchedule( beginHour, beginMinute, beginError, endHour, endMinute, endError, leaderId, week);
    }

}
